#ifndef NV_MAINMENUSTATE_H
#define NV_MAINMENUSTATE_H

#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>

#include "GameState.h"
#include "Button.h"

class MainMenuState : public GameState
{
public:
	static MainMenuState* instance(sf::RenderWindow &windowIn, StateManager& stateManagerIn)
	{
		static MainMenuState MainMenuState(windowIn, stateManagerIn);
		return &MainMenuState;
	}

	enum MainMenuChoice { NOTHING, NEW_GAME, EXIT };

	~MainMenuState();	//MainMenuState has no need for these, but the other GameStates do

	void init();	//These are used to dynamically
	void exit();	//allocate memory

	void pause();	//MainMenuState has no need for these, but the other GameStates do
	void resume();	//MainMenuState has no need for these, but the other GameStates do

	void getInput(sf::RenderWindow& window);
	void update(StateManager& stateManager);
	void draw(sf::RenderWindow& window);

	void setArrowKeySelect(bool setTo);

private:
	short selection, changeTo;
	bool arrowKeySelect;

	sf::String bgFilename;
	sf::Texture &bgTexture;
	sf::Sprite bgSprite;

	sf::Clock introTimer;
	sf::Uint8 opacity;

	Button* m_buttons[2];

	MainMenuState(sf::RenderWindow &windowIn, StateManager& stateManagerIn);
	MainMenuState(const MainMenuState&);
	MainMenuState* operator=(const MainMenuState);
};

#endif